package main

import "fmt"

func main() {
	var dim_Delta [169]float64
	var dim_Origin [169]float64
	for i := 0; i < 169; i++ {
		fmt.Scan(&dim_Delta[i])
		//fmt.Printf("%f ", dim_Delta[i])
	}
	var sum float64 = 0.0
	for i := 0; i < 169; i++ {
		fmt.Scan(&dim_Origin[i])
		sum += dim_Delta[i] * dim_Origin[i]
	}
	fmt.Println(sum)
}
